﻿CREATE TRIGGER BoardLoans_Tracking_Delete
ON [dbo].[BoardLoans] 
AFTER delete
AS 
BEGIN
	UPDATE Sync.BoardLoans_Tracking 
	SET LastUpdatedDate  = getdate(),
		IsDeleted = 1
	FROM Sync.BoardLoans_Tracking s JOIN DELETED i
    ON s.BoardID = i.BoardID AND s.LoanID = i.LoanID
END











